﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/Base.Master" AutoEventWireup="true" CodeBehind="ContentDetail.aspx.cs" Inherits="Exhibition.Manage.ContentDetail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <iframe width="260" height="165" id="colorPalette" src="../control/selcolor.htm" style="visibility: hidden; position: absolute; border: 1px gray solid; left: 297px; top: -20px;" frameborder="0" scrolling="no"></iframe>
    <script type="text/javascript">
        $(function () {
            YXQ.UploadCenter.FileUploadCenter("uploadcontent");
        })
        function GetColor(img_val, input_val) {
            var PaletteLeft, PaletteTop
            var obj = document.getElementById("colorPalette");
            ColorImg = img_val;
            ColorValue = document.getElementById(input_val);

            if (obj) {
                PaletteLeft = getOffsetLeft(ColorImg)
                PaletteTop = (getOffsetTop(ColorImg) - 150)
                if (PaletteTop < 0) PaletteTop += ColorImg.offsetHeight + 165;
                if (PaletteLeft + 260 > parseInt(document.body.clientWidth)) PaletteLeft = parseInt(event.clientX) - 280;
                obj.style.left = PaletteLeft + "px";
                obj.style.top = PaletteTop + "px";
                if (obj.style.visibility == "hidden") {
                    obj.style.visibility = "visible";
                } else {
                    obj.style.visibility = "hidden";
                }
            }
        }

        function getOffsetLeft(elm) {
            var mOffsetLeft = elm.offsetLeft;
            var mOffsetParent = elm.offsetParent;
            while (mOffsetParent) {
                mOffsetLeft += mOffsetParent.offsetLeft;
                mOffsetParent = mOffsetParent.offsetParent;
            }
            return mOffsetLeft;
        }
        function getOffsetTop(elm) {
            var mOffsetTop = elm.offsetTop;
            var mOffsetParent = elm.offsetParent;
            while (mOffsetParent) {
                mOffsetTop += mOffsetParent.offsetTop;
                mOffsetParent = mOffsetParent.offsetParent;
            }
            return mOffsetTop;
        }
        function setColor(color) {
            if (ColorImg.id == "FontColorShow" && color == "#") color = '#000000';
            if (ColorImg.id == "FontBgColorShow" && color == "#") color = '#FFFFFF';
            if (ColorValue) { ColorValue.value = color.substr(1); }
            if (ColorImg && color.length > 1) {
                ColorImg.src = src = '../images/Rect.gif';
                ColorImg.style.backgroundColor = color;
            } else if (color == '#') { ColorImg.src = '../images/rectNoColor.gif'; }
            document.getElementById("colorPalette").style.visibility = "hidden";
        }

    </script>
    <input type="hidden" runat="server" id="hfId" datafield="hfId" />

    <table class="tbs_table">
        <tr>
            <td class="tdtitle">中文标题</td>
            <td class="tddata">
                <input type="text" runat="server" id="txtTitle" datafield="txtTitle" />
                <asp:HiddenField ID="TitleColor" runat="server" />
                <img src="../images/Rect.gif" alt="标题颜色选择" name="MarkFontColor_Show" width="18" height="17" border="0" align="middle" id="MarkFontColor_Show" style="cursor: pointer; background-color: #<%= TitleColor.Value%>;" title="标题颜色选取" onclick="GetColor(this,'<%=TitleColor.ClientID %>');" />
            </td>
            <td class="tdtitle">权重</td>
            <td class="tddata">
                <input type="text" runat="server" id="txtWeight" datafield="txtWeight" value="0" /></td>
        </tr>
        <tr>
            <td class="tdtitle">英文标题</td>
            <td class="tddata" colspan="3">
                <input type="text" runat="server" id="txtETitle" datafield="txtETitle" />
             </td> 
            

        </tr>
        <tr>
            <td class="tdtitle">属性</td>
            <td class="tddata" colspan="3">

                <asp:CheckBoxList ID="rdoList" runat="server" RepeatDirection="Horizontal"></asp:CheckBoxList>
            </td>

        </tr>
        <tr>
            <td class="tdtitle">图片</td>
            <td class="tddata" colspan="3">
                <div id="fileQueue">

                    <input type="file" name="uploadify" id="uploadify" />
                    <p>

                        <a href="javascript:$('#uploadify').uploadifyUpload()">上传</a>| <a href="javascript:$('#uploadify').uploadifyClearQueue()">取消上传</a>
                    </p>
                </div>

                <img src="../images/nopic.jpg" width="160" height="120" id="spPic" runat="server" datafield="spPic" />
                <input type="hidden" runat="server" id="hfPic" datafield="hfPic" />

            </td>

        </tr>
        <tr>
            <td class="tdtitle">所属栏目</td>
            <td class="tddata">
                <asp:DropDownList ID="drpList" runat="server"></asp:DropDownList>
            </td>
            <td class="tdtitle">来源</td>
            <td class="tddata">
                <input type="text" runat="server" id="txtIncome" datafield="txtIncome" /></td>
        </tr>
        <tr>
            <td class="tdtitle">关键字</td>
            <td class="tddata">
                <input type="text" runat="server" id="txtKeyWord" datafield="txtKeyWord" style="width: 300px;" /></td>
          <td class="tdtitle">英文关键字</td>
            <td class="tddata">
                <input type="text" runat="server" id="txtEKeyWord" datafield="txtEKeyWord" />
             </td>              
        </tr>
        <tr>
             <td class="tdtitle">发布人</td>
            <td class="tddata" colspan="3">
                <input type="text" runat="server" id="txtCreatUserName" datafield="txtCreatUserName" /></td>
        </tr>
        <tr>
            <td class="tdtitle">摘要</td>
            <td class="tddata" colspan="3">
                <asp:TextBox TextMode="MultiLine" Rows="5" Columns="100" ID="txtDesc" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="tdtitle">英文摘要</td>
            <td class="tddata" colspan="3">
                <asp:TextBox TextMode="MultiLine" Rows="5" Columns="100" ID="txtEDesc" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="tdtitle">内容</td>
            <td class="tddata" colspan="3">
                <asp:TextBox ID="txtContent" runat="server" TextMode="MultiLine" Rows="10" Columns="120"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="tdtitle">英文内容</td>
            <td class="tddata" colspan="3">
                <asp:TextBox ID="txtEContent" runat="server" TextMode="MultiLine" Rows="10" Columns="120"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td colspan='4' align='center'>
                <asp:Button ID="btnSave" runat="server" Text="保存" CssClass="bt_wb1" OnClick="btnSave_Click" />&nbsp;&nbsp;
                <input type="button" value="返回" class="bt_wb1" onclick="YXQ.Manager.CloseDialog()" /></td>
        </tr>
    </table>
    <script type="text/javascript">


        if (CKEDITOR.instances['<%=txtContent.ClientID%>']) {
            delete CKEDITOR.instances['<%=txtContent.ClientID%>']
        };

        var editor = CKEDITOR.replace('<%=txtContent.ClientID%>'); 

        if (CKEDITOR.instances['<%=txtEContent.ClientID%>']) {
            delete CKEDITOR.instances['<%=txtEContent.ClientID%>']
        };

        var editor = CKEDITOR.replace('<%=txtEContent.ClientID%>'); 
        
    </script>
</asp:Content>
